<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
      content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="format-detection" content="telephone=no">
<title>Title</title>
</head>
<body>
<table class="table table-bordered">
    <caption>&nbsp;</caption>
    <caption>
        交易统计
    </caption>
    <thead>
    <tr>
        <th colspan="4">统计区间<?php echo ($wtime); ?>--<?php echo ($ntime); ?></th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>交易笔数：<?php echo ($bcount); ?></td>
        <td>已支付笔数：<?php echo ($bycount); ?></td>
        <td>已完成：<?php echo ($bywcount); ?></td>
        <td>未完成：<?php echo ($bwwcount); ?></td>
    </tr>
    <tr>
        <td colspan="2">交易金额：<?php echo ($bcount2); ?>;&nbsp;&nbsp;余额支付：<?php echo ($yycount); ?></td>
        <td>已支付：<?php echo ($bycount2); ?></td>
        <td>未支付：<?php echo ($bwcount2); ?></td>
    </tr>

    </tbody>
</table>
</div>
<div id="orderlist">
    <div class="well">
        <table class="table table-striped" id="tab" data-sortable>
            <thead>
            <tr>
                <th>#</th>

                <th>电话</th>
                <th>人数</th>
                <th>出发地</th>
                <th>目的地</th>
                <th>价格</th>
                <th>支付状态</th>
                <th>预约时间</th>
                <th style="width: 30px;">下单时间</th>
            </tr>
            </thead>
            <tbody>
            <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
                    <td><?php echo ($vo["id"]); ?></td>
                    <td width='60px;'><?php echo get_usertel($vo['openid']);?></td>

                    <td width='50px;'><?php echo ($vo["num"]); ?></td>
                    <td width='150px;'><?php echo ($vo["start"]); ?></a> </td>
                    <td width='150px;'><?php echo ($vo["end"]); ?></td>
                    <td><?php echo ($vo["price"]); ?></td>



                    <td>
                        <?php if($vo['pay_statu'] == '0'): ?><font color="red">未支付</font>
                            <?php elseif($vo['pay_statu'] == '1'): ?>
                            <font color="#7cff00"> <?php if($vo["is_ypay"] == 1): ?>余额支付<?php else: ?>微信支付<?php endif; ?></font><?php endif; ?>
                    </td>
                    <td><?php echo ($vo['starttime']); ?></td>
                    <td>
                        <?php echo (date('Y-m-d H:i:s',$vo['addtime'])); ?>
                    </td>
                </tr><?php endforeach; endif; else: echo "" ;endif; ?>

            </tbody>
        </table>
</body>
</html>